#pragma once
#include "QSocketClientManager.h"
#include <QWidget>
#include <QEvent>
#include <QShowEvent>
#include <QHideEvent>
#include <QPaintEvent>
#include <QKeyEvent>
#include <QCloseEvent>
namespace Ui { class QScreenMonitorWidget; };

class QScreenMonitorWidget : public QWidget
{
	Q_OBJECT
	friend class QMainControllerWindow;
	friend class QScreenLabel;
public:
	QScreenMonitorWidget(QWidget *parent = Q_NULLPTR);
	~QScreenMonitorWidget();
	void GetScreenCatchSocketClient(QSOCKETCLIENT qSocketClient);
	void GetScreenControlSocketClient(QSOCKETCLIENT qSocketClient);
	void ReleaseResouce();
public:
	void showEvent(QShowEvent* event);
	void hideEvent(QHideEvent* event);
	void closeEvent(QCloseEvent* event);
	void keyPressEvent(QKeyEvent* event);
private:
	Ui::QScreenMonitorWidget *ui;
	QSOCKETCLIENT m_qScreenCatchSocketClient;
	QSOCKETCLIENT m_qScreenControlSocketClient;
protected:
	void paintEvent(QPaintEvent* event);
};
